﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage<IceScream.ViewModels.ServiceManagerViewModel>" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Service
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="AdminContent" runat="server">

    <h2>Edit Service</h2>

    <form action="" enctype="multipart/form-data" method="post" runat="server">

        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Service.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Service.Name)%>
                <%: Html.ValidationMessageFor(model => model.Service.Name)%>
            </div>
           
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Service.Description)%>
            </div>
            <div class="editor-field">
               <CKEditor:CKEditorControl ID="Description" BasePath="~/Content/ckeditor" runat="server" 
                FilebrowserImageBrowseUrl= '/Content/ckfinder/ckfinder.html'
                FilebrowserImageUploadUrl= '/Content/ckfinder/core/connector/asp/connector.asp'
                FilebrowserBrowseUrl='/Content/ckfinder/ckfinder.html'
                FilebrowserUploadUrl='/Content/ckfinder/core/connector/asp/connector.asp'>
                     <%: Model.Service.Description %>
               </CKEditor:CKEditorControl>
                <%: Html.ValidationMessageFor(model => model.Service.Description)%>

            </div>

            <div class="editor-label">
            <%: Html.Label("Image") %>
            </div>
            <div class="editor-field">
                 <input id="Image" name="Image" type="file" />
                 <img src="<%: Model.Service.Image %>" alt="" title="" border="0" />
            </div>

            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
    </form>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

